import React from 'react';
import { Button, Carousel } from 'antd-mobile';
import Navigation from './Navigation.jsx';
import './me.css';
import { NavLink } from 'react-router-dom';
import UserStore from '../../store/UserStore.js';
import { observer } from 'mobx-react';
import { observable, computed, action } from 'mobx';
import "babel-polyfill";
class Me extends React.Component {    
    constructor(props) {
        super(props);         
        this.state = {      
            isLogin: null
        };   
    }
    async componentDidMount() {        
        let isLogin = await UserStore.checkLogin();        
        console.log(isLogin);   
    
    }
    render() {
        return (
            <div className="me-wrap">
                <div className="me-header">
                    <img src={require('./../images/defaulthead.png')} />
                    <div className="me-title">点击登录</div>
                </div>
                
                <div className="me-button-group">
                    <NavLink exact to="/cisitrecord">
                        <div className="me-button-group-item">
                            <img src={require('./../images/jiuzhenjilu.png')} />
                            <div>就诊记录</div>
                        </div>
                    </NavLink>
                    <NavLink exact to="/feerecord">
                        <div className="me-button-group-item">
                            <img src={require('./../images/jiaofeijilu.png')} />
                            <div>缴费记录</div>
                        </div>
                    </NavLink>
                    <NavLink exact to="/sickhistory">
                        <div className="me-button-group-item">
                            <img src={require('./../images/bingshijilu.png')} />
                            <div>病史记录</div>
                        </div>
                    </NavLink>
                </div>
                <NavLink exact to="/identityconfirm">
                    <div className="me-visit-button">
                        <img src={require('./../images/jiuzhenkadengji.png')} />
                        <div className="me-visit-button-text">就诊登记卡</div>
                    </div>
                </NavLink>  
                <div className="me-visit-button">
                    <img src={require('./../images/chufangjilu.png')} />
                    <div className="me-visit-button-text">处方记录</div>
                </div>
                <div className="me-visit-button">
                    <img src={require('./../images/huayanjilu.png')} />
                    <div className="me-visit-button-text">化验记录</div>
                </div>           
                <div className="me-visit-button">
                    <img src={require('./../images/zhuyuanjilu.png')} />
                    <div className="me-visit-button-text">住院记录</div>
                </div>   
                <div className="navigation-index-wrap">
                    <Navigation />
                </div>
            </div>
        )
    }
}

//导出组件
export default Me;
